/*
 * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef SLE_SSAP_CLIENT_CONFIG_H
#define SLE_SSAP_CLIENT_CONFIG_H
#include <stdint.h>
#include "sle_ssap_config.h"

#define SSAP_CLIENT_NUM_MAX 1

typedef struct {
    uint16_t   startHandle;  /*!< @if Eng service start handle.
                                @else   服务起始句柄。 @endif */
    uint16_t   endHandle;    /*!< @if Eng service end handle.
                                @else   服务结束句柄。 @endif */
    SleUuid    uuid;       /*!< @if Eng service end handle.
                                @else   服务UUID。 @endif */
} ClientFindServiceRes;

typedef struct {
    uint16_t   handle;
    SsapOperateIndication   operateIndication;
    SleUuid    uuid;
    uint8_t    descriptorsCount;
    SsapPropertyDescriptorType descriptorsType;
} ClientFindPropertyRes;

typedef struct {
    SsapFindType    type;      /*!< @if Eng find type { @ref ssap_find_type_t }.
                               @else   查找类型 { @ref ssap_find_type_t }。 @endif */
    SleUuid    uuid;      /*!< @if Eng uuid
                               @else   uuid @endif */
} ClientFindStructureRes;

typedef struct {
    uint16_t handle;
    SleSsapPropertyType  type;
    uint16_t dataLength;
    uint8_t  *data;
} ClientHandleValue;

typedef struct {
    uint16_t handle;
    SleSsapPropertyType  type;
    uint16_t dataLength;
    uint8_t  *data;
} ClientWriteParam;

typedef struct {
    SleUuid uuid;    /*!< @if Eng property handle.
                          @else   属性句柄。 @endif */
    SleSsapPropertyType type;    /*!< @if Eng property type.
                          @else   属性类型。 @endif */
} ClientReadByUuidCmpRes;

typedef struct {
    uint16_t handle;  /*!< @if Eng property handle.
                           @else   属性句柄。 @endif */
    SleSsapPropertyType  type;    /*!< @if Eng property type.
                           @else   属性类型。 @endif */
} ClientWriteRes;

typedef struct {
    SsapFindType    findType;
    uint16_t   startHandle;
    uint16_t   endHandle;
    SleUuid    uuid;
    uint8_t    reserve;
} ClientFindStructure;

typedef struct {
    SsapFindType    findType;        /*!< @if Eng find type { @ref ssap_find_type_t }.
                                 @else   查找类型 { @ref ssap_find_type_t }。 @endif */
    uint16_t   startHandle;   /*!< @if Eng start handle.
                                 @else   起始句柄。@endif */
    uint16_t   endHandle;     /*!< @if Eng end handle.
                                 @else   结束句柄。@endif */
    SleUuid    uuid;        /*!< @if Eng uuid.
                                 @else   uuid@endif */
} ClientReadReqByUUID;

#endif // SLE_SSAP_CLIENT_CONFIG_H